home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / BCCollec / Support / BCNodes.cpp < prev    next >
Encoding:
Text File  |  1994-04-21  |  1.3 KB  |  49 lines  |  [TEXT/MPS ]

  1. //  The C++ Booch Components (Version 2.1)
  2. //  (C) Copyright 1990-1993 Grady Booch. All Rights Reserved.
  3. //
  4. //  Restricted Rights Legend
  5. //  Use, duplication, or disclosure is subject to restrictions as set forth 
  6. //  in subdivision (c)(1)(ii) of the Rights in Technical Data and Computer 
  7. //  Software clause at DFARS 252.227-7013. 
  8. //
  9. //  BCNodes.cpp
  10. //
  11. //  This file contains the definition for various node classes.
  12.  
  13. #include "BCExcept.h"
  14. #include "BCNodes.h"
  15.  
  16. template<class Item, class Value>
  17. BC_TPair<Item, Value>::BC_TPair() {}
  18.  
  19. template<class Item, class StorageManager>
  20. void* BC_TNode<Item, StorageManager>::operator new(size_t s)
  21. {
  22.   return StorageManager::Allocate(s);
  23. }
  24.  
  25. template<class Item, class StorageManager>
  26. void BC_TNode<Item, StorageManager>::operator delete(void* p, size_t s)
  27. {
  28.   StorageManager::Deallocate(p, s);
  29. }
  30.  
  31. template<class Item, class StorageManager>
  32. BC_TBinaryNode<Item, StorageManager>::~BC_TBinaryNode()
  33. {
  34.   BC_Assert((fCount == 1),
  35.             BC_XStorageError("BC_TBinaryNode::~BC_TBinaryNode", BC_kReferenced));
  36. }
  37.  
  38. template<class Item, class StorageManager>
  39. void* BC_TBinaryNode<Item, StorageManager>::operator new(size_t s)
  40. {
  41.   return StorageManager::Allocate(s);
  42. }
  43.  
  44. template<class Item, class StorageManager>
  45. void BC_TBinaryNode<Item, StorageManager>::operator delete(void* p, size_t s)
  46. {
  47.   StorageManager::Deallocate(p, s);
  48. }
  49.